﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdminUserAdd.ascx.cs"
    Inherits="controls_admin_AdminUserAdd" %>
<script type="text/javascript">
    $(document).ready(function () {
        $("#frm").validate(
            $('#<%=txtRepassword.ClientID %>').rules("add", {
                equalTo: "ctl05_txtPassword",
                messages: {
                    equalTo: "<span class='error'>Nhập lại mật khẩu.</span>"
                }
            })
        );
    });
    function visible(div) {
        var divVisible = document.getElementById(div);
        divVisible.style.display = 'block';
    }
    function inVisible(div) {
        var divInVisible = document.getElementById(div);
        divInVisible.style.display = 'none';
    }
</script>
<!-- forms -->
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5 id="txtMTitle" runat="server">
            Thêm Quản Trị Viên</h5>
    </div>
    <div id="divMessage" runat="server">
    </div>
    <!-- end box / title -->
    <div class="form">
        <div class="fields">
            <div class="field  field-first">
                <div class="label">
                    <label for="select">
                        Nhóm Cha:</label>
                </div>
                <div class="input select">
                    <asp:ListBox runat="server" ID="lsbParent" SelectionMode="Multiple" Width="360px"
                        Height="200px" AutoPostBack="True" OnSelectedIndexChanged="lsbParent_SelectedIndexChanged" />
                    <div runat="server" id="NOTE_PARENT" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Họ Tên:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtFullName" runat="server" CssClass="medium"></asp:TextBox>
                    <div runat="server" id="NOTE_FULLNAME" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Tên Đăng Nhập:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtUsername" runat="server" CssClass="small username"></asp:TextBox>
                    <div runat="server" id="NOTE_USERNAME" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Mật Khẩu:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtPassword" runat="server" CssClass="small password required" TextMode="Password"></asp:TextBox>
                    <div runat="server" id="NOTE_PASSWORD" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Nhắc Lại mật khẩu:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtRepassword" runat="server" CssClass="small confpass password"
                        TextMode="Password"></asp:TextBox>
                    <div runat="server" id="NOTE_REPASSWORD" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Số Điện Thoại:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtPhone" runat="server" CssClass="small mobile"></asp:TextBox>
                    <div runat="server" id="NOTE_PHONE" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Địa Chỉ:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtAddress" runat="server" CssClass="medium"></asp:TextBox>
                    <div runat="server" id="NOTE_ADDRESS" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Email:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtEmail" runat="server" CssClass="medium email email_required"></asp:TextBox>
                    <div runat="server" id="NOTE_EMAIL" class="note" />
                </div>
            </div>
            <div class="field">
                <div>
                    <input type="button" onclick="visible('divPlus')" value="Thêm quyền" style="background-color: transparent;
                        border-style: none; color: Green; font-weight: bold; cursor: pointer" />
                </div>
                <div class="input select" id="divPlus" style="display: none">
                    <asp:ListBox runat="server" ID="lsbPlusRole" SelectionMode="Multiple" Width="360px"
                        Height="200px" />
                    <br />
                    <input type="button" value="Ok" style="font-weight: bold" onclick="inVisible('divPlus')" />
                    <div runat="server" id="txtNotePlusRole" class="note" />
                </div>
            </div>
            <div class="field" style="display: none">
                <div class="label">
                    <a href="#" onclick="visible('divExcept')">Bỏ quyền</a>
                </div>
                <div class="input select" id="divExcept" style="display: none">
                    <asp:ListBox runat="server" ID="lsbExceptRole" SelectionMode="Multiple" Width="360px"
                        Height="200px" />
                    <br />
                    <a href="#" onclick="inVisible('divExcept')">Đồng Ý </a>
                    <div runat="server" id="txtNoteExceptRole" class="note" />
                </div>
            </div>
            <div class="buttons">
                <asp:Button ID="btnNewUser" runat="server" Text="Thêm Mới" OnClick="btnNewUser_Click" />
            </div>
        </div>
    </div>
</div>
<!-- end forms -->
